package xyz.mumuwei.youthcourseserver.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author mumuwei
 * @since 2022-02-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class StudentExperience implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 学生id
     */
    @NotNull(message = "学生id不能为空")
    private Integer studentId;

    /**
     * 课程id
     */
    @NotNull(message =  "课程id不能为空")
    private Integer courseId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private String createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateTime;

    /**
     * 逻辑删除: 0：正常,  1：删除
     */
    @TableLogic
    private Integer isDelete;

    /**
     * 课程名
     */
    @TableField(exist = false)
    private String name;

    /**
     * 体验时间
     */
    @TableField(exist = false)
    private String experienceTime;

    /**
     * 学生姓名
     */
    @TableField(exist = false)
    private String realName;

    /**
     * 手机号
     */
    @TableField(exist = false)
    private String phone;
}
